//package com.hsz.autotest.config;
//
//import java.awt.geom.Area;
//import java.util.*;
//
//public class TestTime {
//    public static void main(String[] args){
//
////        Date now=new Date() ;
////        SimpleDateFormat sdf=new SimpleDateFormat("HHmm");
////        String nowStr=sdf.format(now);
////        Integer nowInt=Integer.parseInt(nowStr);
////        Boolean flag=false;
////        String dateAreaStr="9:00-11:00,12:000-13:00,14:00-15:00";
////        String[] dateAreaList=dateAreaStr.split(",");
////        for(String dateArea:dateAreaList){
////            String[] dateArray=dateArea.split("-");
////            if(dateArray.length!=2){
////                continue;
////            }
////            String start=dateArray[0];
////            String end=dateArray[1];
////            Integer startInt=Integer.parseInt(start.replaceAll(";",""));
////            Integer endInt=Integer.parseInt(":","");
////            if(startInt<=nowInt && endInt>=nowInt){
////                flag=true;
////                break;
////            }
////
////        }
////        if(flag){
////            System.out.println("当前时间在时间区间内");
////        }else{
////            System.out.println("当前时间不在时间区间内");
////        }
//
//
//
//        //String areas = "25-30,1-2,3-4,5-6,15-20,7-8,3-3,5-5,5-4,3-4";,按a升序，按b降序排列
//        String areas = "25-30,1-2,3-4,5-6,15-20,7-8,3-3,5-5,5-4,3-4";
//
//        //List<Permission> permissions = list.stream().filter(l -> l.getType().equals(1))
//        //                .collect(Collectors.toList());,
//        //                过滤list集合中属性type为1的值并赋值给permissions集合 在返回list集合 .collect(Collectors.toList()) 转换成list集合
////     List<String> sortList = new ArrayList<String>().stream().sorted((e1,e2)->{
////            String[] e1Arrery=e1.split("-");
////            String[] e2Arrery=e2.split("-");
////            if(!e1Arrery[0].equals(e2Arrery[0])){
////                return Integer.valueOf(e1Arrery[0]).compareTo(Integer.valueOf(e2Arrery[0]));//大于参数中的age就返回正数，小于就返回负数,string就是按字典
////            }else{
////                return Integer.valueOf(e2Arrery[1]).compareTo(Integer.valueOf(e1Arrery[1]));
////            }
////        }).collect(Collectors.toList());
////
////        String areasAfterSorted= StringUtils.join(list,",");
////        System.out.println(areasAfterSorted);
//
//
//        String[] areaArrery=areas.split(",");
//        int length=areaArrery.length;
//        List<Area> areaList=new ArrayList<>();
//        for(int i=0;i<length;i++){
//            String item=areaArrery[i];
//            Area area=new Area();
//            String[] split=item.split("-");
//            area.setA(Integer.valueOf(split[0]));
//            area.setB(Integer.valueOf(split[1]));
//            area.setArea(item);
//            areaList.add(area);
//            for(int i1=0;i1<length-1;i1++){
//                for(int j=i+1;i<length;j++){
//                    Area area1=areaList.get(i1);
//                    Area area2=areaList.get(j);
//                    if(area1.getA()>area2.getA()){
//                        areaList.set(i1,area2);
//                        areaList.set(j,area1);
//                    }else if(area1.getA()==area2.getA() && Area1.getB()<area2.getB()){
//                        areaList.set(i1,area2);
//                        areaList.set(j,area1);
//                    }
//                }
//            }
//            String result=areaList.get(0).getArea();
//            for(int  i2=1;i<length;i++){
//                result=result+","+areaList.get(i2).getArea();
//            }
//        }
//
//
//
//
//    }
//}
